package org.zzh.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.zzh.domain.system.role.PeRole;

import java.util.List;

/**
 * @author Lenovo
 */
@Mapper
public interface PeRoleMapper {

    void deleteRoleUserList(@Param("ids") String[] ids);

    List<PeRole> getAll();

    List<PeRole> list(@Param("name") String name);

    List<PeRole> getUserRoleList(@Param("userId") String userId);

    List<String> getUserRoleIds(@Param("userId") String userId);

    void addList(@Param("roleIds") String[] roleIds, @Param("userId") String userId);

    void clearUserRole(@Param("userId") String userId);

    PeRole findById(@Param("roleId") String roleId);

    void add(PeRole role);

    void update(PeRole role);

    void deleteList(@Param("ids") String[] ids);

    void deleteRoleUserListByRoleIds(@Param("roleIds") String[] roleIds);

}
